-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify that /invite will respond with 200 if the user is already invited to the room #1084
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a changelog entry, and evidence that this is in fact the case please :)
@Half-Shot are you able to take a look at this? |
Yep, let me sort that out. In terms of proof, Synapse would be my evidence. Synapse has a very complex set of rules around how it manages membership but if we assume that it allows a transition of invite -> invite then the handler code will return a 200 response. In practice you can test this yourself by doing: # Create a room, out of band
curl -H "Authorization: Bearer $AT" https://chaotic.half-shot.uk/_matrix/client/v3/rooms/!your:room/invite --data '{"user_id": "@another:user"}'
# Note the membership of the user is now "invite"
curl -H "Authorization: Bearer $AT" https://chaotic.half-shot.uk/_matrix/client/v3/rooms/!your:room/members
# The second request returns a 200 response.
curl -H "Authorization: Bearer $AT" https://chaotic.half-shot.uk/_matrix/client/v3/rooms/!your:room/invite --data '{"user_id": "@another:user"}' This was true in my testing:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise lgtm
Potentially fixes #1083
I believe this might fall within the scope of minor text clarification rather than requiring a full MSC, as it's a behavior that has been in action for a long time (for Synapse at least, and possibly other implementations?). This doesn't seek to correct the response.
Preview: https://pr1084--matrix-spec-previews.netlify.app